package service;

import dao.RoomMapper;
import org.springframework.stereotype.Service;
import pojo.*;

import java.util.List;
@Service
public class RoomServiceImpl implements RoomService{
    private RoomMapper roomMapper;
    public void setRoomMapper(RoomMapper roomMapper){
        this.roomMapper=roomMapper;
    }
    @Override
    public List<Room> queryRoom() {
        return roomMapper.queryRoom();
    }

    @Override
    public int addRoom(Room room) {
        return roomMapper.addRoom(room);
    }

    @Override
    public List<Resident> queryResident() {
        return roomMapper.queryResident();
    }

    @Override
    public List<Room> canOrder() {
        return roomMapper.canOrder();
    }

    @Override
    public int updateState(Room room) {
        return roomMapper.updateState(room);
    }

    @Override
    public int addResident(Resident resident) {
        return roomMapper.addResident(resident);
    }

    @Override
    public int updateRoom(Room room) {
        return roomMapper.updateRoom(room);
    }

    @Override
    public List<Room> notOrder() {
        return roomMapper.notOrder();
    }

    @Override
    public int updateResident(Resident resident) {
        return roomMapper.updateResident(resident);
    }

    @Override
    public int updateStateOpen(Room room) {
        return roomMapper.updateStateOpen(room);
    }

    @Override
    public int addHistoryResident(Resident resident) {
        return roomMapper.addHistoryResident(resident);
    }

    @Override
    public int receiveRentMoney(Room room) {
        return roomMapper.receiveRentMoney(room);
    }

    @Override
    public int deleteResident(Resident resident) {
        return roomMapper.deleteResident(resident);
    }

    @Override
    public int receiveSubscription(Resident resident) {
        return roomMapper.receiveSubscription(resident);
    }

    @Override
    public List<Resident> selectResident(Resident resident) {
        return roomMapper.selectResident(resident);
    }

    @Override
    public List<Resident> roomResident(Resident resident) {
        return roomMapper.roomResident(resident);
    }

    @Override
    public List<HistoryResident> allHistory() {
        return roomMapper.allHistory();
    }

    @Override
    public List<RoomCount> selectCount() {
        return roomMapper.selectCount();
    }

    @Override
    public int deleteRoom(Room room) {
        return roomMapper.deleteRoom(room);
    }

    @Override
    public List<Resident> findResident(Resident resident) {
        return roomMapper.findResident(resident);
    }

    @Override
    public String findRoomId(Resident resident) {
        return roomMapper.findRoomId(resident);
    }

    @Override
    public void updateRentMoney() {
        roomMapper.updateRentMoney();
    }

    @Override
    public void restoreRentMoney() {
        roomMapper.restoreRentMoney();
    }

    @Override
    public Integer totalMoney(Year year) {
        return roomMapper.totalMoney(year);
    }

    @Override
    public int addIncomeMoney(Year year) {
        return roomMapper.addIncomeMoney(year);
    }

    @Override
    public Year findYear(Year year) {
        return roomMapper.findYear(year);
    }

    @Override
    public int updateIncomeMoney(Year year) {
        return roomMapper.updateIncomeMoney(year);
    }

}
